package com.qcby.service.Impl;

import com.qcby.dao.UserHouseMapper;
import com.qcby.model.Change;
import com.qcby.model.House;
import com.qcby.model.Sell;
import com.qcby.service.HouseService;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created with IntelliJ IDEA.
 *
 * @Author: Tom
 * @Date: 2021/07/23/17:28
 * @Description:
 */
@Service
public class HouseServiceImpl implements HouseService {
    @Autowired
    UserHouseMapper userHouseMapper;
    @Override
    public List<House> selectByUserId(Integer userId) {
        return userHouseMapper.selectByUserId(userId);
    }

    @Override
    public void updataStateById(Integer id) {
        userHouseMapper.updataStateById(id);
    }

    @Override
    public Sell selectById(Integer id) {
        return userHouseMapper.selectById(id);
    }

    @Override
    public void updataUserId(Change swap) {
        userHouseMapper.updataByUserId(swap);
    }
}
